import React, { Component } from 'react';
import { List, Avatar } from 'antd';
import moment from 'moment';
import proImg from '../../assets/proImg.png';

class ProFbList extends Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  componentDidMount() {}

  render() {
    const { dataList } = this.props;
    return (
      <div>
        <h4>反馈记录</h4>
        <List
          itemLayout="horizontal"
          split={false}
          dataSource={dataList}
          renderItem={item => (
            <List.Item>
              <List.Item.Meta
                avatar={<Avatar src={proImg} />}
                title={
                  <div>
                    <span>{item.creName}</span>
                    <span style={{ marginLeft: 20 }}>{item.role}</span>
                  </div>
                }
                description={
                  <div>
                    <p> {item.content}</p>
                    <p>{moment(item.creTime).format('YYYY-MM-DD HH:mm')}</p>
                  </div>
                }
              />
            </List.Item>
          )}
        />
        ,
      </div>
    );
  }
}

export default ProFbList;
